using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// Summary description for User
/// </summary>
public class User
{

	/// <summary>
    /// Fields of User
    /// </summary>
    #region Fields
    int id;    
    string userName;    
    string password;
    DateTime registeredDate;   
    DateTime lastLogin;    
    int role;   
    Person personInfo;  
   
    #endregion

    /// <summary>
    /// Properties of User
    /// </summary>
    #region Properties
    public int Id
    {
        get { return id; }
        set { id = value; }
    }
    public string UserName
    {
        get { return userName; }
        set { userName = value; }
    }

    public string Password
    {
        get { return password; }
        set { password = value; }
    }
    public DateTime RegisteredDate
    {
        get { return registeredDate; }
        set { registeredDate = value; }
    }
    public DateTime LastLogin
    {
        get { return lastLogin; }
        set { lastLogin = value; }
    }
    public int Role
    {
        get { return role; }
        set { role = value; }
    }
    public Person PersonInfor
    {
        get { return personInfo; }
        set { personInfo = value; }
    }
    #endregion

    /// <summary>
    /// Constructures User
    /// </summary>
    #region Constructures
    public User()
    {
        id = 0;
        userName = "";
        password = "";
        registeredDate = new DateTime();
        lastLogin = new DateTime();
        personInfo = new Person();

    }
    public User(int id, string userName, string password, DateTime registeredDate, DateTime lastLogin, Person personInfo)
	{
        this.id = id;
        this.userName = userName;
        this.password = password;
        this.registeredDate = registeredDate;
        this.lastLogin = lastLogin;
        this.personInfo = personInfo;
    }
    #endregion
}
